<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/jsp/common/head.jsp"%>
<div class="content">
    <div class="container-fluid">
        <nav class="pull-left">
            <strong>你现在所在的位置是:</strong>&nbsp;&nbsp;&nbsp; <span> 供应商管理页面 > 供应商信息查看页面</span><br> <br>
        </nav>
    </div>

    <div class="row">
        <!-- 左侧供应商信息展示 -->
        <div class="col-lg-4 col-md-5">
            <div class="card card-user">
                <div class="image">
                    <img src="${pageContext.request.contextPath}/statics/img/background.jpg" alt="背景图片" />
                </div>
                <div class="content">
                    <div class="author">
                        <!-- 判断供应商头像 -->
                        <c:choose>
                            <c:when test="${provider.companyLicPicPath == null || provider.companyLicPicPath == ''}">
                                <img class="avatar border-white" src="${pageContext.request.contextPath}/statics/img/faces/face-1.jpg" />
                            </c:when>
                            <c:otherwise>
                                <img class="avatar border-white" src="${provider.companyLicPicPath}" />
                            </c:otherwise>
                        </c:choose>
                        <h4 class="title">
                            ${provider.proName}<br />
                            <a href="#"><small>@${provider.proCode}</small></a>
                        </h4>
                    </div>
                    <p class="description text-center">
                        ${provider.proDesc}
                    </p>
                </div>
                <hr>
                <div class="text-center">
                    <div class="row">
                        <div class="col-md-3 col-md-offset-1">
                            <h5>
                                ${provider.proContact}<br /> <small>联系人</small>
                            </h5>
                        </div>
                        <div class="col-md-3">
                            <h5>
                                ${provider.proPhone}<br /> <small>联系电话</small>
                            </h5>
                        </div>
                        <div class="col-md-4">
                            <h5>
                                ${provider.proAddress}<br /> <small>地址</small>
                            </h5>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 右侧详细信息展示 -->
        <div class="col-lg-8 col-md-7">
            <div class="card">
                <div class="header">
                    <h4 class="title">
                        供应商信息 <small> Supplier Information</small>
                    </h4>
                </div>
                <div class="content">
                    <p>
                        <strong>供应商编号：</strong><span>${provider.proCode}</span>
                    </p>
                    <p>
                        <strong>供应商名称：</strong><span>${provider.proName}</span>
                    </p>
                    <p>
                        <strong>供应商描述：</strong><span>${provider.proDesc}</span>
                    </p>
                    <p>
                        <strong>供应商联系人：</strong><span>${provider.proContact}</span>
                    </p>
                    <p>
                        <strong>联系电话：</strong><span>${provider.proPhone}</span>
                    </p>
                    <p>
                        <strong>供应商地址：</strong><span>${provider.proAddress}</span>
                    </p>
                    <p>
                        <strong>传真：</strong><span>${provider.proFax}</span>
                    </p>
                    <p>
                        <strong>营业执照：</strong>
                        <c:choose>
                            <c:when test="${provider.companyLicPicPath == null || provider.companyLicPicPath == ''}">
                                暂无
                            </c:when>
                            <c:otherwise>
                                <img src="${provider.companyLicPicPath}" width="240px" />
                            </c:otherwise>
                        </c:choose>
                    </p>
                    <p>
                        <strong>组织机构代码证：</strong>
                        <c:choose>
                            <c:when test="${provider.orgCodePicPath == null || provider.orgCodePicPath == ''}">
                                暂无
                            </c:when>
                            <c:otherwise>
                                <img src="${provider.orgCodePicPath}" width="240px" />
                            </c:otherwise>
                        </c:choose>
                    </p>

                    <div class="providerAddBtn">
                        <input type="button" id="back" name="back" value="返回"
                               class="btn btn-success btn-fill btn-wd" onclick="window.history.back();">
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<%@include file="/WEB-INF/jsp/common/foot.jsp"%>

<script type="text/javascript">
    $(".sidebar-wrapper .nav li:eq(5)").addClass("active");
</script>
<script type="text/javascript"
        src="${pageContext.request.contextPath}/statics/js/providerdetail.js"></script>
